<%
//validar la session
    String usuario = null;
    String nombre = null;
    String codigo = null;
    
    if (session.getAttribute("usuario") == null) {
        response.sendRedirect("login.jsp");
    } else {
         usuario = (String) session.getAttribute("usuario");
         nombre = (String) session.getAttribute("nombre"); 
         codigo = (String) session.getAttribute("codigo");
         
    }
    String userName = null;
    String sessionID = null;
    Cookie[] cookies = request.getCookies();
    if (cookies != null) {
        for (Cookie cookie : cookies) {
            if (cookie.getName().equals("user")) {
                userName = cookie.getValue();
            }
            if (cookie.getName().equals("JSESSIONID")) {
                sessionID = cookie.getValue();
            }
        }
    }  
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>SARAD - Sistema de Administraci&oacute;n de Requerimientos y Actividades de Desarrollo</title>

        <link href="ui/css/metro-bootstrap.css" rel="stylesheet" >
        <link href="ui/css/metro-bootstrap-responsive.css" rel="stylesheet" >
        <link href="ui/js/prettify/prettify.css" rel="stylesheet" >
        <script type="text/javascript" src="ui/js/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="ui/js/jquery/jquery.widget.min.js"></script>
        <script type="text/javascript" src="ui/js/jquery/jquery.mousewheel.js"></script>
        <script type="text/javascript" src="ui/js/metro.min.js"></script>
        <script type="text/javascript" src="ui/js/prettify/prettify.js"></script>
        <script type="text/javascript" src="ui/js/metro/metro-button-set.js"></script>
        <script type="text/javascript" src="ui/js/metro/metro-accordion.js"></script>
        <script src="ui/js/jquery/jquery.dataTables.js"></script>
        <script type="text/javascript" src="ui/js/index.js"></script>
        
        <script type="text/javascript" src="ui/js/jquery/ui/jquery-ui-1.10.4.custom.js"></script>
        <link href="ui/css/jquery/ui/smoothness/jquery-ui-1.10.4.custom.css" rel="stylesheet" >
        
        <script src="ui/js/jquery/highcharts.js"></script>
        <!--<script src="http://code.highcharts.com/stock/highstock.js"></script>-->
        <script src="ui/js/jquery/exporting.js"></script>
        
    </head>
    <body class="metro">
        <%@ include file="partials/header.jspf" %>
        <!--<header class="bg-dark" data-load="partials/header.html"></header>-->


        <div style="background-size: cover; /*height: 700px;*/">
            <div class="container" style="padding: 50px 20px">         

                <%
                    String pagina = "";
                    String ruta = "";

                    if (request.getParameter("accion") != null) {
                        pagina = request.getParameter("accion");
                        ruta = "modules/proyectos/" + pagina + ".jsp";
                %>
                <jsp:include page="<%=ruta%>"></jsp:include>
                <%
                } else {
                %>
                <div>
                    <legend style="font-size: 18px; color: #00356a; font-weight: bold">MIS REQUERIMIENTOS</legend>
                    <div class="example">
                        <table class="table striped hovered dataTable" id="requerimientosindex-dt">
                            <thead>
                            <tr>
                                <th class="text-left">Id</th>
                                <th class="text-left">Codigo</th>
                                <th class="text-left">T&iacute;tulo</th>
                                <th class="text-left">Estado</th>
                                <th class="text-left"> Inicio</th>
                                <th class="text-left"> Final</th>
                                <th style="display: none" class="text-left">Asignado</th>
                                <th style="display: none" class="text-left">Tipo</th>
                            </tr>
                            </thead>

                            <tbody>
                                <tr>
                                    <td colspan="4" class="dataTables_empty">Loading data from server</td>
                                </tr>
                            </tbody>

                            <tfoot>
                            <tr>
                                <th class="text-left">Id</th>
                                <th class="text-left">Codigo</th>
                                <th class="text-left">T&iacute;tulo</th>
                                <th class="text-left">Estado</th>
                                <th class="text-left"> Inicio</th>
                                <th class="text-left"> Final</th>
                                <th style="display: none" class="text-left">Asignado</th>
                                <th style="display: none" class="text-left">Tipo</th>
                            </tr>
                            </tfoot>
                        </table>

                    </div>

                    
                    
                </div>
                <%
                    }
                %>
            <div id="container" style="width:100%; height:400px;"></div>
            </div>            
        </div>
            
            
            
            
        <%@ include file="partials/footer.jspf" %>
    </body>
</html>
